package com.atguigu.com.miaosha.controller;

import com.atguigu.com.miaosha.service.SecKillService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author 满超
 * @date 2020/07/04
 **/
@Controller
public class TestController {

    @Autowired
    SecKillService secKillService;

    @ResponseBody
    @RequestMapping("/sentinel")
    public void uploadSec() {
        //自动上架每天最新秒杀商品
        secKillService.uploadSec();
    }

    @ResponseBody
    @RequestMapping("/test/sentinel")
    public String test() {
        return "测试sentinel";
    }
}
